package top.hudk.type;


import com.yueyue.common.utils.JsonUtils;
import top.hudk.test.ScaleUtils;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class TestBigDecimal {


    public static void main(String[] args) {

        User user = new User();

        user.setDecimal(new BigDecimal("12.365"));
        user.setDecimal2(new BigDecimal("12.000"));
        user.setDecimal3(new BigDecimal("12.100"));
        user.setAmount1(new BigDecimal("12.169"));
        user.setAmount2(new BigDecimal("12.164"));
        user.setAmount3(new BigDecimal("12.165"));

        User user2 = new User();

        user2.setDecimal(new BigDecimal("12.365"));
        user2.setDecimal2(new BigDecimal("12.000"));
        user2.setDecimal3(new BigDecimal("12.100"));
        user2.setAmount1(new BigDecimal("12.169"));
        user2.setAmount2(new BigDecimal("12.164"));
        user2.setAmount3(new BigDecimal("12.165"));

        User user3 = new User();

        user3.setDecimal(new BigDecimal("12.365"));
        user3.setDecimal2(new BigDecimal("12.000"));
        user3.setDecimal3(new BigDecimal("12.100"));
        user3.setAmount1(new BigDecimal("12.169"));
        user3.setAmount2(new BigDecimal("12.164"));
        user3.setAmount3(new BigDecimal("12.165"));

        List<User> list = new ArrayList<>();
        list.add(user);
        list.add(user2);
        list.add(user3);

        List<List<User>> list2 = new ArrayList<>();
        list2.add(list);

        List<List<List<User>>> list3 = new ArrayList<>();
        list3.add(list2);

        List<List<List<List<User>>>> list4 = new ArrayList<>();
        list4.add(list3);

        Map<String, List<List<List<List<User>>>>> map = new HashMap<>();

        map.put("",list4);

        System.out.println(JsonUtils.toJson(map));

        ScaleUtils.batchScale(map);

        System.out.println(JsonUtils.toJson(map));


    }
}
